<template>
  <el-container style="height: 100%">
    <el-aside width="200px" class="aside">
      <Aside/>
    </el-aside>
    <el-main class="textareaClass">
      <router-view style="height: 100%"/>
    </el-main>
  </el-container>
</template>

<script>
import Aside from "@/components/Aside";
import {useStore} from "vuex";
import {onBeforeMount} from "vue";
import router from "@/router";

export default {
  name: `Home`,
  components: { Aside},
  setup(){
    const store=useStore();
    onBeforeMount(()=>{
      if(!store.getters.isLogin){
        router.push('lock');
      }
    });
    return{
      store
    }
  }
}
</script>
<style scoped>
.aside{
  height: 100%;
}
.textareaClass{
  padding-top: 25px;
  padding-right: 25px;
}
</style>
